{template:header}
{template:usercp_menu}
<div id="ucp_content">
	<h3>{$lang['usercp']}</h3>
	<em>{$lang['buddylist']}</em>
	<div class='ucp'>
	<if="$show['userlist']">
		<table cellpadding='0' cellspacing='1' width="100%" class="ttable">
		<thead>
			<tr class="thead" align="left">
				<th width="20%">{$lang['_username']}</th>
				<th width="40%">&nbsp;</th>
				<th width="10%">{$lang['_options']}</th>
				<th width="30%">&nbsp;</th>
			</tr>
		</thead>
		<tbody class="tbody">
			<foreach="$contacts AS $data">
			<tr align="left" class="item_list" onmouseover="this.className='item_change';" onmouseout="this.className='item_list';">
				<td><a href='profile.php{sessionurl}u={$data['contactid']}'>{$data['contactname']}</a></td>
				<td class="desc">{$data['description']}</td>
				<td>
					<a href='private.php{sessionurl}do=edituser&amp;u={$data['contactid']}'>{$lang['_edit']}</a>
					<a href='private.php{sessionurl}do=deleteuser&amp;u={$data['contactid']}'>{$lang['_delete']}</a>
				</td>
				<td class="desc">{$data['text']}</td>
			</tr>
			</foreach>
		</tbody>
		</table>
	<else>
		{$lang['nouseradded']}
	</if>
	</div>

	<form action="private.php" method="post">
	<input type='hidden' name='s' value='{sessionid}' />
	<input type='hidden' name='do' value='adduser' />
	<em>{$lang['adduseraddress']}</em>
	<div class='ucp'>
		{$lang['_username']}
		<input type='text' name='username' size='20' maxlength='40' value='{$username}' class='input_normal' />
		{$lang['inputdescription']}
		<input type='text' name='description' size='30' maxlength='60' value='' class='input_normal' />
		{$lang['alluserpm']}
		<select name='allowpm' class="select_normal" >
			<option value='1' selected="selected">{$lang['_yes']}</option>
			<option value='0'>{$lang['_no']}</option>
		</select>
	</div>
	<div class="ucp item_change"><input type="submit" accesskey="s" value="{$lang['adduseraddress']}" class="input_big" /></div>
	</form>
</div>
{template:footer}